import Vue from "vue";
import App from "./App";
import store from "./store";
import { router, RouterMount } from "./router";
import uView from "uview-ui";
import { AppUtils } from "./utils/app";
import theme from "./theme";

// import LowCodePage from 'low_code_base'

import lowCode from "low_code_base";
import lowCodeComponents from "low_code_base/components/lc/lc-components";
import lowCodePage from "low_code_base/components/lc/lc-page";
import widget from "./service/api/widget";
Vue.config.productionTip = false;
Vue.prototype.$store = store;
Vue.prototype.$widget = widget;
Vue.prototype.$theme = theme;
App.mpType = "app";

Vue.component("lowCodeComponents", lowCodeComponents);
Vue.component("lowCodePage", lowCodePage);
Vue.use(uView);
Vue.use(lowCode);
Vue.use(router);
uni.$u.config.unit = "px";
// #ifdef H5
Vue.prototype.AppUtils = new AppUtils();
import vConsole from "vconsole"; //调试工具
if (process.env.VUE_APP_ENV !== "production") {
  // 移动端打印
  Vue.prototype.$vConsole = new vConsole();
}
// #endif

const app = new Vue({
  store,
  ...App,
});
//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
// #ifdef H5
RouterMount(app, router, "#app");
// #endif

// #ifndef H5
app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif
